
<style>
body {
	font-family: calibri, Helvetica, sans-serif;
	font-size: 13px;
	line-height: 18px;
}

table {
	max-width: 600px;
	width: 100%;
}

table th,table td {
	text-align: left;
}

table th {
	text-align: left;
	background-color: #f3f3f3;
	line-height: 25px;
}

table td {
	text-align: left;
}
.blue{
	color:#119ad7;
}
.black{
	color:#000;
}
.none-dec{
	text-decoration: none;
}
.light-grey {
  color: #fefefe;
}
.title{
 		font-size: 17px;
 		font-weight: bold;
}
</style>

<br>
<br>
<table>
	<tbody>
	<tr >
			<td><img src="{$DOMAIN}/images/rsgk-logo.png" />
		    </td>
		</tr>
		<tr ><td height="10"></td></tr>
		<tr >
			<td height="2" bgcolor="#b8dff3"></td>
		</tr>
		<tr ><td height="10"></td></tr>
	<tr>
		<td>Hi {$user.gname}</td>
	</tr>
	<tr>
			<td><br>{$message}<br>
			</td>
		</tr>
</table>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
	<tr bgcolor="#f3f3f3">
		<th colspan="2" align="left">Invoice Details</th>
	</tr>
	<tr>
		<td width="50%">Order Number:</td>
		<td>{$payment.payment_transaction_no}</td>
	</tr>
	<tr>
		<td>Order Date:</td>
		<td>{$order.cart_closed_date|date_format:"%e %B %Y"}</td>
	</tr>
	{if $payment.payment_response_cardscheme}
		<tr>
			<td>Payment method:</td>
			<td>{$payment.payment_response_cardscheme}</td>
		</tr>
	{/if}	
	<tbody>
</table>
<br />
&nbsp;
<br />
<table cellpadding="0" cellspacing="0" border="0"  width="100%">
	<tr bgcolor="#f3f3f3">
		<th colspan="2" align="left">Address</th>
	</tr>
	<tr>
		<td width="50%">Name:</td>
		<td>{$shipping.address_name|capitalize} {$shipping.address_surname|capitalize}</td>
	</tr>
	<tr>
		<td>Address</td>
		<td>{$shipping.address_line1} {if $shipping.address_line2}, {$shipping.address_line2}{/if}</td>
	</tr>
	<tr>
		<td>Suburb:</td>
		<td>{$shipping.address_suburb}</td>
	</tr>
	<tr>
		<td>State:</td>
		<td>{$shipping.address_state}</td>
	</tr>
	<tr>
		<td>Postcode:</td>
		<td>{$shipping.address_postcode}</td>
	</tr>
	<tr>
		<td>Phone:</td>
		<td>{$shipping.address_telephone}</td>
	</tr>
<!-- 	<tr>
		<td>Shipping instructions:</td>
		<td>{if $payment.payment_shipping_comments}{$payment.payment_shipping_comments}{else}None{/if}</td>
	</tr> -->
</table>
<br />
&nbsp;
<br />
<table cellspacing="0" cellpadding="0" border="0" width="100%">

	<tr bgcolor="#f3f3f3">
		<th align="left">Item</th>
		<th align="left">Qty</th>
		<th align="left">Unit Price</th>
		<th style="text-align: right">Total Price</th>
	</tr>
	{foreach $orderItems as $item}
	<tr valign="top" aling="left">
		<td>
			<a href="{$DOMAIN}{$item.url}?utm_source=website&utm_medium=email&utm_campaign=order-status-email">
				{if $item.cartitem_product_gst eq '0'} {assign var=free value=1} *{/if}{if $item.cartitem_custom_type}{$item.cartitem_custom_type}: {/if}{$item.cartitem_product_name} 
					{if $item.attributes } 
					{assign var='hasweek' value=0}
					{assign var='hasTrial' value=0}
					{if $item.cartitem_class_flag eq 1 && $item.cartitem_enrolment_type eq 'T' }
						{assign var='hasTrial' value=1} 
						<b>[ Date: {getdatebyweekdaystartdate weekday=$item.class_weekday startdate=$item.term_start_date weeksafter=$item.attributes.0.cartitem_attr_attr_value_name-1 dateformat='d/m/Y'} ]</b>
					{else}
						{if $item.cartitem_product_id gt 0}
						{foreach from=$item.attributes item=attr name=attributesarr}
							{if $attr.cartitem_attr_attribute_name eq 'week'}
									{assign var='hasweek' value=$hasweek+1}
							{else}
								 / {$attr.cartitem_attr_attribute_name}: {$attr.cartitem_attr_attr_value_name}
							{/if} 
						{/foreach}
						{if $hasweek gt 0 && $item.cartitem_enrolment_type eq 'S'}
							/ Weeks: {$hasweek}
						{/if}
						{/if}
					{/if}
				{/if}
				</a>
		</td>
		<td width="10%">{$item.cartitem_quantity}</td>
		<td width="20%">{$CURRENCY_SYMBOL}{$item.cartitem_product_price|number_format:2:".":","}</td>
		<td width="20%" style="text-align: right">{$CURRENCY_SYMBOL}{$item.cartitem_subtotal|number_format:2:".":","}</td>
	</tr>
	{/foreach}
	<tr valign="top">
		<td>&nbsp;</td>
		<td>&nbsp;</td>
		<td><strong>Subtotal</strong></td>
		<td style="text-align: right"><strong>{$CURRENCY_SYMBOL}{$payment.payment_subtotal|number_format:2:".":","}</strong></td>
	</tr>
	{if $payment.payment_discount neq '0.00'}
	<tr valign="top">
		<td>&nbsp;</td>
		<td>&nbsp;</td>
		<td><strong>Sibling discount</strong></td>
		<td style="text-align: right"><strong>{$CURRENCY_SYMBOL}-{$payment.payment_discount|number_format:2:".":","}</strong></td>
	</tr>
	{/if}
	{if $payment.payment_additional neq '0.00'}
	<tr valign="top">
		<td>&nbsp;</td>
		<td>&nbsp;</td>
		<td><strong>{$payment.payment_additional_description}</strong></td>
		<td style="text-align: right"><strong>{$CURRENCY_SYMBOL}{$payment.payment_additional|number_format:2:".":","}</strong></td>
	</tr>
	{/if}
	{if $payment.payment_shipping_fee neq '0.00'}
	<tr valign="top">
		<td>&nbsp;</td>
		<td>&nbsp;</td>
		<td><strong>Shipping</strong></td>
		<td style="text-align: right"><strong>{$CURRENCY_SYMBOL}{$payment.payment_shipping_fee|number_format:2:".":","}</strong></td>
	</tr>
	{/if}
	<tr valign="top">
		<td colspan="4"><hr></td>
	</tr>
	<tr valign="top">
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>Total (excl. {$TAX_CODE})</td>
    {assign var='totalExclGST' value=$payment.payment_total - $payment.payment_gst}
    <td style="text-align: right">(${$totalExclGST|number_format:2:".":","})</td>
  </tr>
	<tr valign="top">
    <td>{if $free}(*){$TAX_CODE} free item.{/if}</td>
    <td>&nbsp;</td>
    <td>{$TAX_CODE}</td>
    <td style="text-align: right">(${$payment.payment_gst|number_format:2:".":","})</td>
  </tr>
  {if $payment.payment_surcharge neq '0.00'}
	<tr valign="top">
		<td>&nbsp;</td>
		<td>&nbsp;</td>
		<td><strong>Credit card surcharge</strong></td>
		<td style="text-align: right"><strong>{$CURRENCY_SYMBOL}{$payment.payment_surcharge|number_format:2:".":","}</strong></td>
	</tr>
	{/if}
	<tr valign="top">
		<td>&nbsp;</td>
		<td>&nbsp;</td>
		<td><strong>TOTAL</strong></td>
		<td style="text-align: right"><strong>{$CURRENCY_SYMBOL}{$payment.payment_total|number_format:2:".":","}</strong></td>
	</tr>
	{if $payment.payment_charged_amount neq $payment.payment_total}
	<tr valign="top">
		<td colspan="4"><hr></td>
	</tr>
	<tr valign="top">
		<td>&nbsp;</td>
		<td>&nbsp;</td>
		<td><strong>Partial payment</strong></td>
		<td style="text-align: right"><strong>{$CURRENCY_SYMBOL}-{$payment.payment_charged_amount|number_format:2:".":","}</strong></td>
	</tr>
	<tr valign="top">
		<td>&nbsp;</td>
		<td>&nbsp;</td>
		<td><strong>Pending payment</strong></td>
		{assign var='pending' value=$payment.payment_total - $payment.payment_charged_amount + $payment.payment_surcharge}
		<td style="text-align: right"><strong>{$CURRENCY_SYMBOL}{$pending|number_format:2:".":","} {if $nextpayment}[Due date: {$nextpayment|date_format:"%Y-%m-%d"}]{/if}</strong></td>
	</tr>
	{/if}
	<tr valign="top">
		<td colspan="4"><hr></td>
	</tr>
</table>
<br />
&nbsp;
<br />
<table width="100%" cellspacing="0" cellpadding="0" border="0">
	<tr>
		<td>If you have any questions about the Ready Steady Go Kids program please call our friendly support team on  <a href="tel:{$PHONE}">{$PHONE} </a>  between 9.00 am and 4.00 pm (AEST).
		<br>
		</td>
	</tr>
	<tr>
		<td>Kind regards,<br>
		The Team at Ready Steady Go Kids<br>
		</td>
	</tr>
	<tr><td height="10"></td></tr>
		<tr><td height="10" bgcolor="#3a94d7"></td></tr>
		<tr bgcolor="#3a94d7">
		<td style="font-family: Arial, 'Helvetica Neue', 'Trebuchet MS', sans-serif; font-size:14px; color:#fff; line-height:20px; padding-left:15px; padding-right:15px;">
			{if $COMPANY.phone}P: <a href="tel:{$COMPANY.phone}" style="color:#fff; text-decoration:none;">{$COMPANY.phone}</a>{/if}
			{if $COMPANY.fax}| F: {$COMPANY.fax}{/if}<br>
		  {$COMPANY.address.street} {$COMPANY.address.suburb} {$COMPANY.address.state} {$COMPANY.address.postcode}<br>
		  <a href="{$DOMAIN}" style="color:#fff; text-decoration:none;" title="Visit our website">{$COMPANY.website}</a></td>
		</tr>
		<tr><td height="10" bgcolor="#3a94d7"></td></tr>
</table>